<template>
	<el-button v-if="isShow">{{ label }}</el-button>
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import { storeToRefs } from 'pinia';
import { useBtnList } from '/@/stores/btnsList';
const router = useRouter();
const props = defineProps(['label','name']);
const { btnList } = storeToRefs(useBtnList());
const isShow = ref(true);
onMounted(() => {
	isShow.value = btnList.value.findIndex(s=>s.Name== props.name&&s.Path==router.currentRoute.value.path) > -1
});
</script>
